package com.sh.test;

/**
 * @Auther: sh
 * @Version 1.0
 * @Description: 要执行的任务
 */
public class MyTask implements Runnable {
    private int taskId;

    public MyTask(int taskId) {
        this.taskId = taskId;
    }

    @Override
    public void run() {
//        System.out.println(Thread.currentThread().getName()+"：正在执行任务, 任务编号为: " + taskId);
//        try {
////            Thread.sleep(200);
//
//        } catch (InterruptedException e) {
//            throw new RuntimeException(e);
//        }
        System.out.println(Thread.currentThread().getName()+"：任务执行完毕, 任务编号为：" + taskId);
    }
}


